package net.assassin8.bautista.stalker;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MallDetailsActivity extends Activity {
	private long mallId;
	private String mallName;
	private String mallAddress;
	private String mallDescription;
	private int mallFloors;
	private TextView mallNameTextView;
	private TextView mallAddressTextView;
	private TextView mallDescriptionTextView;
	private TextView mallFloorsTextView;
	private Button startButton;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Bundle extras = getIntent().getExtras();
		mallId = extras.getLong("MALL_ID");
		mallName = extras.getString("MALL_NAME");
		mallAddress = extras.getString("MALL_ADDRESS");
		mallDescription = extras.getString("MALL_DESCRIPTION");
		mallFloors = extras.getInt("MALL_FLOORS");
		
		setContentView(R.layout.mall_details);
		
		mallNameTextView = (TextView) findViewById(R.id.MallNameTextView);
		mallAddressTextView = (TextView) findViewById(R.id.AddressLabel);
		mallDescriptionTextView = (TextView) findViewById(R.id.DescriptionLabel);
		mallFloorsTextView = (TextView) findViewById(R.id.FloorsLabel);
		startButton = (Button) findViewById(R.id.StartStalk);
		
		mallNameTextView.append(mallName);
		mallAddressTextView.append(mallAddress);
		mallDescriptionTextView.append(mallDescription);
		mallFloorsTextView.append(""+mallFloors);
		
		startButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent i = new Intent(MallDetailsActivity.this, UserProfileActivity.class);
				i.putExtra("MALL_ID", mallId);
				MallDetailsActivity.this.startActivity(i);
				MallDetailsActivity.this.finish();
			}
			
		});
	}
	
	

}
